{foreach from=$module_groups key=group item=modules}
<div id="left_menu_group_modules">{t}{$group}{/t}</div>
<div class="admin_menu">
  <ul>
		{foreach item=module from=$modules}
		{if isset($active) AND $active == $module}
		<li class="active"><a href="/{$module}">{t}{$module}{/t}</a></li>
	  {* if isset($submenu) AND $active_module == 'sections'*}
		{if isset($submenu)}
	</ul>
		<div class="admin_sub_menu">
      <ul>
        {foreach item=section from=$submenu}
        <li{if ($menu_active == $section)} class="active"{/if}><a href="/{$module}/{$section}">{t}{$section}{/t}</a></li>
        {if isset($sub_menu) AND ($menu_active == $section) }
			</ul>
				<div class="admin_sub_sub_menu">
			 		<ul>
          	{include file="$template/blocks/sub_menu/`$module`.tpl"}
			 		</ul>
				</div>
				<ul>
				{/if}
				{/foreach}
			</ul>
    </div>
	<ul>
		{/if}
		{else}
		<li><a href="/{$module}">{t}{$module}{/t}</a></li>
		{/if}
		{/foreach}
	</ul>
</div>
<br/>
{/foreach}